
/**
 * 数字操作
 */
export default {
  round(num, point) {//四舍五入
    if (isNaN(num)) {
      return null;
    }
    point = Math.pow(10, point + 1);
    num = num * point;
    if (num === +num) {
      return parseInt((num + 5) / 10) / point * 10;
    } else {
      return +num;
    }
  }
}

